extends Talent
var utils = globalData.infoDs["g_AneHekUtils"]
func init():
	name = "为所欲为"

func _connect():
	sys.main.connect("onBattleStart",self,"run")

func run():
	var chas = utils.getAllChas(2)
	var cnt = int(sys.main.player.gold / 100)
	for i in chas:
		if i.id.find("TD") != -1 || i.id.find("cex___Hide") != -1:
			i.addBuff(BF.new(cnt))

func get_info():
	return "每持有100金币，开局所有塔防之光角色增加3%增伤，最多30%\n此天赋不需要升级"
	
class BF:
	extends Buff
	var canremove:bool = false
	func _init(lv):
		attInit()
		att.atkR = min(0.3,0.03 * lv)